﻿<UserControl x:Class="LiveTiss.Guias.GuiaSolicInternacao"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:uc="clr-namespace:LiveTiss.Guias.UserControls"
    xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    mc:Ignorable="d" x:Name="guia" Width="910">

    <UserControl.Resources>
        <converter:EnumConverter x:Key="enumConverter" />
    </UserControl.Resources>

    <StackPanel Width="910">
        <uc:CabecalhoSolicitacao Value="{Binding Path=Guia.identificacaoGuiaSolicitacaoInternacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
            TituloGuia="Guia de Solicitação de Internação"/>
        <uc:Beneficiario Value="{Binding Path=Guia.dadosBeneficiario, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
        <uc:Solicitante Value="{Binding Path=Guia.dadosSolicitante, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
        <uc:Solicitante Value="{Binding Path=Guia.dadosSolicitanteAtendimento, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
                        Titulo="Dados do Contratado Solicitante / Dados da Internação"/>
        <Grid x:Name="Agrupamento" Margin="0,19,0,0" VerticalAlignment="Top">
            <Rectangle x:Name="Contorno" RadiusY="6" RadiusX="6" Stroke="#4D898989"/>
            <StackPanel x:Name="Conteudo_Agrupamento" Margin="12,4,8,0">
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Caráter da Internação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <ComboBox Width="300" Margin="0,6,0,0" HorizontalAlignment="Left" Height="25" SelectedValue="Key" DisplayMemberPath="Value"
                            ItemsSource="{Binding Path=Guia.caraterInternacaoItems, ElementName=guia, Mode=OneWay}"
                            SelectedIndex="{Binding Path=Guia.caraterInternacao, ElementName=guia, Converter={StaticResource enumConverter}, ConverterParameter='EletivaEmergencia', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
                            />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Tipo Internação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <ComboBox Width="300" Margin="0,6,0,0" HorizontalAlignment="Left" Height="25" SelectedValue="Key" DisplayMemberPath="Value"
                            ItemsSource="{Binding Path=Guia.tipoInternacaoItems, ElementName=guia, Mode=OneWay}"
                            SelectedIndex="{Binding Path=Guia.tipoInternacao, ElementName=guia, Converter={StaticResource enumConverter}, ConverterParameter='TipoInternacao', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
                            />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Regime de Internação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <ComboBox Width="300" Margin="0,6,0,0" HorizontalAlignment="Left" Height="25" SelectedValue="Key" DisplayMemberPath="Value"
                            ItemsSource="{Binding Path=Guia.regimeInternacaoItems, ElementName=guia, Mode=OneWay}"
                            SelectedIndex="{Binding Path=Guia.regimeInternacao, ElementName=guia, Converter={StaticResource enumConverter}, ConverterParameter='RegimeInternacao', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
                            />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Indicação Clínica:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <TextBox Margin="0,6,323,0" MaxLength="500" Text="{Binding Path=Guia.indicacaoClinica, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
            </StackPanel>
        </Grid>
        <uc:HipoteseDiagnostica Value="{Binding Path=Guia.hipotesesDiagnosticas, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
        <uc:ListaProcedimentosSolicitados Value="{Binding Path=Guia.procedimentosExamesSolicitados,ElementName=guia,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
        <uc:ListaOPMSolicitadasOPMSolicitada Value="{Binding Path=Guia.OPMsSolicitadas, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
        <Grid Margin="0,19,0,0" VerticalAlignment="Top">
            <Rectangle RadiusY="6" RadiusX="6" Stroke="#4D898989"/>
            <TextBlock TextWrapping="Wrap" Text="Dados da Autorização" Margin="10,10,8,0" VerticalAlignment="Top" FontFamily="Segoe UI Semibold" FontSize="16"/>
            <StackPanel Margin="12,44,8,0">
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel x:Name="Data" Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Data Provável da Admissão Hospitalar:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <sdk:DatePicker HorizontalAlignment="Left" Margin="0,6,0,0" SelectedDate="{Binding Path=Guia._dataProvavelAdmisHosp, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                    </StackPanel>
                </Grid>
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Dias Solicitados:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <TextBox Margin="0,6,323,0" Text="{Binding Path=Guia.diasSolicitados, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
            </StackPanel>
        </Grid>
        <uc:GuiaSolicInternacaoPrestadorSolicitado Value="{Binding Path=Guia.prestadorSolicitado, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
        <Grid Margin="0,19,0,0" VerticalAlignment="Top">
            <Rectangle RadiusY="6" RadiusX="6" Stroke="#4D898989"/>
            <StackPanel Margin="12,14,8,0">
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Observação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <TextBox Margin="0,6,323,0" MaxLength="240" Text="{Binding Path=Guia.observacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                    </StackPanel>
                </Grid>
            </StackPanel>
        </Grid>
    </StackPanel>
</UserControl>
